Skip to content

feat: preflight-validate every module against its image's real OCI config - #21

Merged
ValgulNecron merged 1 commit into
mainfrom
feat/preflight-validator
Jul 14, 2026
Merged

ValgulNecron merged 1 commit into
mainfrom
feat/preflight-validator

Conversation

@ValgulNecron

Copy link
Copy Markdown
Collaborator

The root issue: four modules shipped broken and were only ever caught by launching them on a cluster. Every single failure was statically detectable from the image's own config — we just never looked.

validate.py pulls each declared image's OCI config (Docker Hub anonymous token flow, multi-arch aware) and enforces the rules those bugs imply:

rule the bug it would have caught
no ENTRYPOINT + shell Cmd ⇒ template must set spec.command ARK — got a non-interactive bash, read EOF, exited 0, restart-looped with an empty log
image User non-root ⇒ template must set security.runAsUser Project Zomboid — ran as root; image refuses
runAsUser set ⇒ template must declare HOME Project Zomboid — SteamCMD resolved $HOME/Steam → //Steam
mountPath must not shadow the entrypoint Garry's Mod / PZ — PVC over baked-in image content
image must exist three modules once shipped fabricated images
rcon.protocol ∈ {source, telnet, none} the agent implements no others
mods.loaders requires spec.versions otherwise mods silently disable

Verified against git history: it flags all four historical bugs from their pre-fix templates, and is clean on the current ones.

It already earned its keep: it found a real bug in cs2, which has never been launched — joedwards32/cs2 declares User: 1000:1000 but the template had no security block and no HOME, so it would have hit both Project Zomboid failures on first boot. Fixed in this PR before anyone ran it.

Registry failures degrade to a warning rather than failing the build spuriously. Wires into CI — this repo had none.

…nfig

Four modules shipped broken and were only caught by launching them on a
cluster. Every failure was statically detectable from the image's own config:

  ark    no ENTRYPOINT and Cmd=/bin/bash, template set no spec.command, so
         the container got a non-interactive bash, read EOF and exited 0 —
         restart-looping with an empty log
  pz     image is rootless; we ran it as root, then as the uid its README
         claims (1000) rather than the uid its /etc/passwd actually has
  pz     spec.security.runAsUser silently drops $HOME, so SteamCMD resolved
         "$HOME/Steam" to "//Steam" and died
  gmod   PVC mounted over baked-in image content, shadowing entrypoint.sh

validate.py pulls each declared image's OCI config (Docker Hub anonymous
token flow, handling multi-arch indexes) and enforces the rules those bugs
imply, plus: the image must actually exist (three modules once shipped with
fabricated images), rcon.protocol must be one the agent implements, and
mods.loaders requires a versions catalog. Registry failures degrade to a
warning rather than failing the build spuriously.

Verified against git history: it flags all four historical bugs from the
pre-fix templates, and is clean on the current ones.

It also found a real, unlaunched bug: cs2 declares User 1000:1000 with no
security block and no HOME, so it would have hit BOTH project-zomboid
failures on first boot. Fixed here before anyone ran it.

Wires into CI — this repo had none.

Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant